package jaux.tank.generator.domain;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import jaux.tank.generator.util.ConfigUtil;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

@Data
@FieldNameConstants
public class TankRoot {
	
	public static final String TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
	
	public static final String VERSION_FORMAT = "yyyy.MM.dd-HH.mm.ss";
	
	public TankRoot() {
		this.applications = new ArrayList<>(Arrays.asList(new TankApplication()));
		this.entities = new  ArrayList<>();
		this.relationships = new ArrayList<>();
		this.enums = new ArrayList<>();
		this.constants = new  ArrayList<>();
		this.tankVersion = ConfigUtil.get("tank.version");
		this.tankGeneratorVersion = ConfigUtil.get("tank.generator.version");
	}
	
	private String createdTime;
	
	private String updatedTime;
	
	private String tankVersion;
	
	private String tankGeneratorVersion;
	
	private String id;
	
	private String name;

	private List<TankApplication> applications;
	
	private List<TankEntity> entities;
	
	private List<TankEntityRelationship> relationships;
	
	private List<TankEnum> enums;
	
	private List<TankConstant> constants;
}
